home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93c.txt
/
000044_icon-group-sender _Tue Sep 7 10:51:47 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1994-02-02
|
2KB
Received: from owl.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Tue, 7 Sep 1993 09:02:42 MST
Received: by owl.cs.arizona.edu; Tue, 7 Sep 1993 09:02:41 MST
Date: Tue, 07 Sep 1993 10:51:47 -0600 (CST)
From: Chris Tenaglia - 257-8765 <TENAGLIA@MIS.MCW.EDU>
Subject: Re: return results
To: icon-group@cs.arizona.edu
Message-Id: <01H2NWSUY7428WWOAL@mis.mcw.edu>
Organization: Medical College of Wisconsin (Milwaukee, WI)
X-Vms-To: IN%"icon-group@cs.arizona.edu"
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Transfer-Encoding: 7BIT
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
I have occasions to use this too. I think it depends on whether the results
are part of a series. Then the 'suspend' approach is better suited. I have
shied away from records, and return lists in most other cases. I think it
may also be handy to return a table. Then you can have random access to the
multiple results by some key.
procedure called()
result := table("n/a")
result["value"] := operation1()
result["fudge"] := operation2()
result["guess"] := operation3()
result["speci"] := operation4()
result["quant"] := 6
result["keys"] := "value fudge guess spec quant keys"
return result
end
...
query := called()
Then query["keys"] returns the names of the keys. Well a
key(query) could cycle between them too. Also query["quant"]
returns the number keys. I suppose you caould pack all sorts
of meta-information into something that returns a table. Mostly
I like the freedom to use all, some, one or none of the results
in any random order. I don't use this yet, but this stream of
inspired the idea (maybe in parallel with many others.
Chris Tenaglia (System Manager) | "The past explained,
Medical College of Wisconsin | the future fortold,
8701 W. Watertown Plank Rd. | the present largely appologized for."
Milwaukee, WI 53226 | Organon to The Doctor
(414)257-8765 |
tenaglia@mis.mcw.edu